export default {
  props: {
    value: {
      type: Boolean,
      default: false
    },
    options: Object
  },
  data() {
    return {
      visible: false,
      confirmLoading: false,
    }
  },
  watch: {
    value() {
      this.initValue()
    },
    visible(val) {
      if (!val) {
        this.$emit('input', val)
      }
    }
  },
  mounted() {
    this.initValue()
  },
  methods: {
    initValue() {
      this.visible = this.value
    }
  },
}